﻿using DataModels.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

namespace ReportingManagement.Components.DHIS
{
    public class DatasetComparerViewModel : ModelBase
    {
        private int _AggregationLevel;
        private object _OrganizationUnit;
        private int _StartYear;
        private int _StartMonth;
        private int _EndYear;
        private int _EndMonth;
        private int _ReportId;
        private ObservableCollection<DatasetComparerIndicatorValue> _DatasetComparerIndicatorValues;

        public DatasetComparerViewModel()
        {
            var now = DateTime.Now;
            _StartYear = now.Year;
            _StartMonth = now.Month;
            _EndYear = now.Year;
            _EndMonth = now.Month;
            _AggregationLevel = DatasetComparer.FACILITY_LEVEL;
            _DatasetComparerIndicatorValues = new ObservableCollection<DatasetComparerIndicatorValue>
            {
                new DatasetComparerIndicatorValue
                {
                    IndicatorDescription = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising ",
                    DataElementDescription = "pain was born and I will give you a complete account of the system, and expound the actual",
                    IQSMSValue = 29,
                    DHISValue = null
                },
                new DatasetComparerIndicatorValue
                {
                    IndicatorDescription = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising ",
                    DataElementDescription = "pain was born and I will give you a complete account of the system, and expound the actual",
                    IQSMSValue = 29,
                    DHISValue = null
                }
            };
        }

        public int AggregationLevel 
        {
            get { return _AggregationLevel; }
            set
            {
                _AggregationLevel = value;
                OnPropertyChanged("AggregationLevel");
            }
        }

        public object OrganizationUnit 
        {
            get { return _OrganizationUnit; }
            set
            {
                _OrganizationUnit = value;
                OnPropertyChanged("OrganizationUnit");
            }
        }

        public int StartYear 
        {
            get { return _StartYear; }
            set
            {
                _StartYear = value;
                OnPropertyChanged("StartYear");
            }
        }

        public int StartMonth 
        {
            get { return _StartMonth; }
            set
            {
                _StartMonth = value;
                OnPropertyChanged("StartMonth");
            }
        }

        public int EndYear 
        {
            get { return _EndYear; }
            set
            {
                _EndYear = value;
                OnPropertyChanged("EndYear");
            }
        }

        public int EndMonth 
        {
            get { return _EndMonth; }
            set
            {
                _EndMonth = value;
                OnPropertyChanged("EndMonth");
            }
        }

        public int ReportId
        {
            get { return _ReportId; }
            set
            {
                _ReportId = value;
                OnPropertyChanged("ReportId");
            }
        }

        public ObservableCollection<DatasetComparerIndicatorValue> DatasetComparerIndicatorValues
        {
            get { return _DatasetComparerIndicatorValues; }
            set
            {
                _DatasetComparerIndicatorValues = value;
                OnPropertyChanged("DatasetComparerIndicatorValues");
            }
        }
    }
}
